﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
    {

}

<blockquote class="layui-elem-quote1 quoteBox layui-form layui-search">
    <div class="layui-form-item" style="margin-bottom:0px">
        <label class="layui-form-label">模糊查询：</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="txtKeyWord" name="txtKeyWord" placeholder="接收人/发送人/标题" />
        </div>
        <label class="layui-form-label">信息类型：</label>
        <div class="layui-input-inline">
            <select name="msg_type" id="msg_type">
                <option value="0">所有类型</option>
                <option value="100">对话信息</option>
                <option value="101">系统消息</option>
            </select>
        </div>
        <div class="layui-inline">
            <a class="layui-btn" id="funBtnSearch"><i class="layui-icon layui-icon-list"></i>搜索</a>
        </div>
    </div>
</blockquote>

<div class="layui-form">
    <div class="layui-table-tool tool-btn">
        <a class="layui-btn  layui-btn-darkblue" id="funBtnSend"><i class="layui-icon ayui-icon-dialogue"></i>发送</a>
        <a class="layui-btn  layui-btn-danger " id="funBtnRemove"><i class="layui-icon layui-icon-delete"></i>删除</a>
    </div>
    <table class="layui-hide" id="messageList" lay-filter="messageList"></table>
</div>

@section Foot
    {
    @*详情*@
    <script type="text/html" id="massage_detail">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header"><h3>{{d.data.title}}</h3>  </div>
                    <div class="layui-card-body">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{d.data.content}}
                    </div>
                    <div class="layui-card-body">
                        <div class="layui-col-sm8">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </div>
                        <div class="layui-col-sm4">
                            {{d.data.create_date}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </script>

    @*状态*@
    <script type="text/html" id="switchStatusTpl">
        <input type="checkbox" name="is_valid" value="{{d.id}}" lay-skin="switch" lay-text="未读|已读" disabled="" {{ d.status == 100 ? 'checked' : '' }}>
    </script>

    @*类型*@
    <script type="text/html" id="switchTypeTpl">
        <input type="checkbox" name="is_valid" value="{{d.id}}" lay-skin="switch" lay-text="对话信息|系统消息" disabled="" {{ d.msg_type == 100 ? 'checked' : '' }}>
    </script>

    @*按钮工具*@
    <script type="text/html" id="gridTool">
        {{# if (d.is_sender===true && d.status == 100){}}
        <a class="layui-btn layui-btn-xs layui-btn-lightgreen" lay-event="funBtnEdit"><i class="layui-icon layui-icon-edit"></i>修改</a>
        {{# } else { }}
        <a class="layui-btn layui-btn-xs layui-btn-disabled"><i class="layui-icon layui-icon-edit"></i>修改</a>
        {{# }}}

        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="funBtnRead"><i class="layui-icon layui-icon-search"></i>查看</a>

        {{# if (d.is_receiver===true){}}
        <a class="layui-btn layui-btn-xs layui-btn-danger " lay-event="funBtnRemove"><i class="layui-icon layui-icon-delete"></i>删除</a>
        {{# } else { }}
        <a class="layui-btn layui-btn-xs layui-btn-disabled"><i class="layui-icon layui-icon-delete"></i>删除</a>
        {{# }}}
    </script>

    <script src="~/areas/basic/js/message.list.js"></script>
}


